home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_asm / ma22#1 / example1.48 < prev    next >
Encoding:
Text File  |  1991-07-16  |  746 b   |  46 lines

  1. ;
  2. ; Sample source file for the Intel 8048
  3. ;
  4. ; (this program does not do anything, it is only an example)
  5. ;
  6.     title    Sample source file
  7. ;
  8. ; Definitions
  9. ;
  10. cr    data    0dh    ;carriage return
  11. lf    data    10    ;line feed
  12. RAM:    data    2000h    ;memory start
  13. ppi0    data    8000h    ;ppi 0
  14. crppi0    data    ppi0+1    ;control register
  15. srppi0    data    ppi0+2    ;status register
  16. offset    set    0
  17. ;
  18. ; Variables
  19. ;
  20.     org    RAM    ;variables
  21. key    ds    16    ;key buffer
  22. loop1:
  23. offset    set    9
  24. ;
  25. ; Program
  26. ;
  27.     mov    a,#'*'
  28.     clr    c
  29.     xrl    a,@R0
  30.     jc    loop1
  31.     mov    r0,#10
  32.     movd    a,p4
  33.     call    delay
  34.     jmp    loop1
  35. ;
  36. ; Delay routine
  37. ;
  38. delay:    djnz    r0,delay
  39.     ret
  40. ;
  41. ; Dummy data
  42. ;
  43. routines dw 1234h,0f800h,0 ;routine addresses
  44. messg1    db    cr,lf,'String no 1.',0
  45. messg2    db    cr,lf,lf,'Press a key.',0
  46.     end